<template>
    <table-dialog ref="dialogRef" title="客户列表">
        <template #default>
            <table-grid
                style="height: 100%"
                :button-list="buttonList"
                :tableColumn="khTableColumn"
                :tableData="khTableData"
            ></table-grid>
        </template>
    </table-dialog>
</template>

<script>
export default {
	data () {
		return {
			dialogTableVisible: false,
            buttonList: [
                {name: "新增",code: "add",type: "primary"}
            ],
			khTableColumn: [
				{type: 'seq', width: 60},
				{type: 'checkbox', width: 50},
				{field: 'code', title: '客户代码'},
				{field: 'name', title: '客户名称'},
				{field: 'xs', title: '销售目标'},
				{field: 'hk', title: '回款目标'},
				{field: 'fy', title: '费用目标'},
				{field: "ctrl", title: "操作", fixed:"right", width: 200,
					slots: {default: ({ row, column }) => {
							return [
								<div>
									<el-button size="small" type="primary">历史查询</el-button>
									<el-button size="small" type="success">参与部门</el-button>
								</div>
							]
						},
					}
				},
			],
			khTableData: [
				{
					code: "person001",
					name: "客户名称001",
					xs: 2000,
					hk: 2000,
					fy: 2000,
				},
				{
					code: "person002",
					name: "客户名称002",
					xs: 2000,
					hk: 2000,
					fy: 2000,
				},
			]
		}
	},
	mounted () {

	},
	methods: {
		init(){
			this.$refs.dialogRef.openDialog();
		}
	}
}
</script>

<style lang="scss" scoped>

</style>
